package com.longteng.diamond.dao;

import com.longteng.diamond.domain.InterfaceTest;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * Created by Administrator
 * DATE : 2018/6/28
 * TIME : 20:23
 * PROJECT : java-lesson
 * PACKAGE : com.longteng.lesson
 *
 * @author <a href="mailto:taki@qq.com">Administrator</a>
 */
@Mapper
public interface InterfaceTestMapper {
    /**
     * 获取接口
     * @param interfaceTest
     * @return List<InterfaceTest>
    * */
    public List<InterfaceTest> getInterfaceTest(InterfaceTest interfaceTest);
    /**
     * 获取接口和用例
     * @param projectId
     * @return List<InterfaceTest>
     * */
    public List<InterfaceTest> findInterfaceAndTestCase(Integer projectId);
    /**
     *  查询所有行
     * @param interfaceTest
     * @return long
     */
    public Long queryAllRow(InterfaceTest interfaceTest);

    /**
     * 根据id获取接口
     * @param interfaceId
     * @return InterfaceTest
     */
    public InterfaceTest findInterfaceTestById(Integer interfaceId);
    /**
     * 新增接口
     * @param interfaceTest
     * @return long
     */
    public void addInterfaceTest(InterfaceTest interfaceTest);

    /**
     * 修改接口
     * @param interfaceTest
     * @return
     */
    public void updateInterfaceTest(InterfaceTest interfaceTest);

    /**
     * 修改绑定host
     * @param hostId
     * @return
     */
    public void updateInterfaceTestHostId(Integer hostId);

    /**
     * 删除接口
     * @param interfaceId
     * @return long
     */
    public void deleteInterfaceTestById(Integer interfaceId);

    /**
     *绑定接口header
     * @param interfaceTestList
     * @return
     */
    public void bindHeaders(List<InterfaceTest> interfaceTestList);
    /**
     * 根据id获取接口数据
     * @param interfaceIds
     * @return
     */
    public List<InterfaceTest> findInterfaceTestByIds(List interfaceIds);
}
